public class Car {
    String carName;
    int carAge;
    String carColor;
    public void show(Car this){//方法隐含this
        System.out.printf(this.carName);
        //外部类访问内部类成员,必须创建对象
        Engine e=new Engine();
        e.engineName="劳斯莱斯牌";
        System.out.printf(e.engineName);
    }
    //创建内部类
    class Engine{
        String engineName;
        int engineAge;
        public void show(){
            System.out.printf(engineName);
            //内部类可以直接访问外部类成员,包括私有
            System.out.printf(carName);
        }
    }
}
